home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / Cloaker 1.2a / Cloaker ReadMe < prev    next >
Encoding:
Text File  |  1995-07-16  |  12.4 KB  |  282 lines  |  [TEXT/Edt7]

  1. Cloaker 
  2. by Grant Guenther
  3.  
  4. •What is Cloaker?
  5.  
  6.   Cloaker is a program that will move resources, either to other types
  7.   or to a text file.  You can also encrypt your resources.
  8.  
  9. •Why did you make Cloaker?
  10.  
  11.   So programmers don't have to worry about hackers and other types 
  12.   snooping around their resource forks looking for goodies or easter
  13.   eggs...
  14.  
  15. •But why would i want to use this?
  16.  
  17.   Several reasons.  First of all, if you're making a program and, for
  18.   example, you want a PICT resource but you don't want any ResEdit hackers
  19.   to know that it even exists.  you can use Cloaker to move the PICT
  20.   resource as another type of resource.  For further protection, you
  21.   can even encoded the PICT and hardcode the decode in your program
  22.   (i've done it in this one).  
  23.  
  24.   Maybe there are some resources in a program you want to save as a text
  25.   file.  For instance, i knew of some Raw data pictures in this one
  26.   program that i wanted to extract.  I had to manually cut-and-paste
  27.   segments of it, hoping i didn't make a mistake, and then try decoding
  28.   it.  With Cloaker, you can simply save that resource into a text file!
  29.  
  30.   Lastly, if you wanted to send encrypted files to friends, this will
  31.   do that.  It's not what it's really intended for, and not the best
  32.   program to do so, but it IS possible and nearly impossible for any
  33.   others to identify as "Whacked."  You could, in fact, use it as
  34.   personal protection--maybe you don't want anyone else do know about
  35.   your "GIF collection"...
  36.  
  37.   There is another use, of which i'm a little reluctant to suggest:  you
  38.   could "piggyback" files on Macintosh archives and upload to Mac
  39.   boards.  For instance, you could take a GIF, save it as a resource on
  40.   another GIF, and upload that file (or stuff it first).  The piggyback
  41.   GIF would probably not be found for a long time.
  42.  
  43.   That comes from a previous idea:  if the user has the coding to
  44.   display GIFs or covert GIFs->Picts, he can save his graphic data
  45.   as GIFs (or JPEGS or whatever mows his lawn) instead of PICTs.
  46.  
  47.   For all this and more, I felt that $5 was enough...
  48.  
  49. •I noticed a similarity between this and Torgo...
  50.  
  51.   that's because i wrote this one right after i finished Torgo 1.0a.  
  52.   I used much of the same coding and ideas.  In fact, it was while
  53.   i was writing Torgo that i found a need for this program.  I wanted
  54.   to move a resource from one type to another, but i couldn't--the
  55.   resource was too big to cut-and-paste hex, so i couldn't possibly
  56.   save it to either a text file OR the desired resource.  I toyed around
  57.   with the resource manager some, and did a quick-job doing it.  i
  58.   expanded that quick job to this.
  59.  
  60.  
  61. •What happens if i try to "replace" a file when i save?
  62.  
  63.   it all depends on what kind of file you're saving.  if you're saving
  64.   a data file -> a resource file, then the file will NOT be replaced--
  65.   rather, the resource you requested will be added.  i made this so
  66.   so you wouldn't have to create several files for several conversions--
  67.   you could save all your resources in one file.
  68.  
  69.   if you save a resource -> a data file, the data fork will be replaced
  70.   but the resources should remain intact.  
  71.  
  72.   if you are encoding or decoding a file, the file will be replaced with
  73.   the new one, resource fork and all.
  74.  
  75.  
  76. •Why the difference between "normal" data files and PICT data files?
  77.  
  78.   When a program opens a PICT resource, it differs greatly than the
  79.   same picture as a PICT data file.  What's the difference?  the data
  80.   file has a header--it tells certain information about the picture,
  81.   mostly a palette of colors to use.  Resource picts use the System
  82.   Palette.  When you want to edit and save a picture with a graphic
  83.   editor and use it as a resource in your program, save it as a PICT,
  84.   run Cloaker, and save it to a resource from a PICT source.  As a
  85.   test, do this, and save it as a resource type PICT.  Use resedit
  86.   to open your file.  you should see the pict you just imported!  (unless
  87.   you didn't use the system palette)
  88.  
  89.   When you import pict data files, the header is chopped off.  this
  90.   also means that, if you export a resource to a data file, you cannot
  91.   open that data file as a pict (even if you changed the file type).
  92.   no program will open it because it first reads a header...a header
  93.   that's missing in your data file.  the solution?  use resedit, open
  94.   your resource as a pict (you may have to move it to a PICT resource),
  95.   copy, and paste in your graphic editor.
  96.  
  97.  
  98. •I moved a resource, but all it did was make a copy (ie the original
  99.  resource didn't disappear)
  100.  
  101.   good...it shouldn't!  tampering with resources is a dangerous thing,
  102.   and i didn't think that everyone wanted me to erase their resources
  103.   for them.  the original reason i started this program, remember is that
  104.   i wanted to move a resource from one type to another, and i could not.
  105.   i had no means to.  this fufills that need.  if you want the original
  106.   resource deleted, then i suggest you erase it yourself with ResEdit.
  107.  
  108. •I noticed another kind of conversion:  PICT -> StartUpScreen.  Explain.
  109.  
  110.   I noticed that it was inconvienent to try and remove a PICT resource
  111.   from a program without hassling around with cutting and pasting
  112.   (assuming you have the memory to cut and paste the picture).  Cloaker
  113.   was originally designed for tasks like this at hand. 
  114.  
  115.   What a startup screen is:  if you save a picture file of type 
  116.   StartUpScreen (a popular format--it's available with GifConverter,
  117.   GraphicsConverter, SuperPaint, Adobe Photoshop, and others).  It is
  118.   file that has a PICT resource of ID 0 in it.  If you save this picture
  119.   named StartUpScreen and put it into your System Folder, your Macintosh
  120.   will read this file and show it at startup (instead of "Welcome to
  121.   Macintosh").  
  122.  
  123.   If you convert a PICT resource to a StartUpScreen, you can use the
  124.   above programs to open that picture.
  125.  
  126. •What's this "AWB?"
  127.  
  128.   AWB (_A_NSI _W_anna_B_e) is a Ascii Art file.  If you've used my
  129.   Text Modifer, you should be familiar with this.  In fact, it's the
  130.   same as in Text Modifier, except now instead of relying on .raw data
  131.   files, you can use PICTs!  
  132.  
  133.   What does it do?  It takes a PICT and converts it into an Ascii art
  134.   file.  You might want to note the following:
  135.  
  136.   a)  Since this program converts the colors to black and white (and,
  137.       in fact, takes your colors and converts them to system 256 colors),
  138.       you may want to adjust your picture in greys (perhaps by changing
  139.       it to standard 256 colors, and, better yet, reduced to 32 colors).
  140.  
  141.   b)  You may want to scale your PICTs to 75x??? pictures.  Most word
  142.       processors have difficulty viewing texts with more than 80 lines
  143.       (if you're using a standard font size 9).  This program does not
  144.       scale it for you.
  145.  
  146.   c)  The BEST font to use, as I've seen, is IBMKlone, if you can find
  147.       it.  The second is Pica, and the next is Monaco.  You can use
  148.       whatever size you want;  i suggest 9 for most uses.
  149.  
  150.   d)  If you want to print you AWB on more than one page horizontally,
  151.       Text Modifier 1.5 will help you cut large files in that way.
  152.  
  153.   e)  I MIGHT in the future make a AWB->PICT converter.  (I have it
  154.       ready in my coding).  However, i won't unless demand is great enough.
  155.  
  156. •What's all in this package?
  157.  
  158.   -Cloaker: the main feature.
  159.   -Whacked.lib, Whacked lib.h:  Library and header file for Whacked 
  160.                                 encryption.
  161.   -test:  A file that contains a whacked PICT in it.  Try it out!
  162.           It is a full PICT (ie has a header), encrypted with keys
  163.           1, 2, and 3 on, and "Hello World" as the key (no quotes;
  164.           case sensitive).  First save the resource "test" id 128 as a 
  165.           data file. Then decode and save as "test."  Use any program 
  166.           that opens PICTs to view it.  (You will need to change the 
  167.           file type with ResEdit, Hax, FileLift, etc. to 'PICT').
  168.  
  169.   -Cloaker ReadMe:  the file you're reading right now!
  170.  
  171.   -Kewl Finder.pict / Kewl Finder.AWG:  A demonstration of AWB.
  172.  
  173. •Tell me about this "whacked" code.
  174.  
  175.   The Whacked Encryption Alogrithm (WEA) is a very small and simple
  176.   encryption sequence.  At the same time, it's an incredibly difficult
  177.   encryption sequence to crack.
  178.  
  179.   There is one key (up to 255 characters) and 4 switches. Each switch
  180.   will yield a different result.  
  181.  
  182.   Now, according to the new law passed a year or so ago, i'm supposed to
  183.   provide a backdoor.  (This, btw, is fully unconstitutional).  So I
  184.   have.  However, since i have no desire to create a program myself that
  185.   could crack it (and none of the resources or time--read on), i will
  186.   give you the alogrithm and anyone who wants is more than welcome to
  187.   write the program.
  188.  
  189.   First of all, the key is variable length, from 0 to 255 characters, and,
  190.   assuming there is no control-keys (which there aren't), there are about
  191.   223 valid characters (yes, this is case sensitive).  Now, without
  192.   the switches, you would have to decode an encrypted program 223*255 + 1
  193.   times...which is about 56865 files.  Already, had this encoded file
  194.   been 1k, we've used up about 56megs, and lord knows how long it
  195.   would take to check each and every file...
  196.  
  197.   now, you have to repeat that for each of the switches, either on or off.
  198.   for 4 switches there are about 16 combinations.  56865 x 16 = 909840
  199.   files.  we're getting into the gigabytes now.  
  200.  
  201.   ...and, of course, that's assuming you are using my alogrithm.  if you
  202.   were using some version of you're own, then you might as well give up.
  203.   the combinations sky-rocket here.  i doubt ANY supercomputer could
  204.   possibly try to decode it, even if i told what the switches do.
  205.  
  206.   I include the library to my code so that any programmers can use it.
  207.   My original purpose was to encrypt resources.  For instance, let's say
  208.   you write a Star Trek action game.  You include some STR# resources
  209.   that reveal that you can get a cloaking device.  What if you don't
  210.   want a hacker to find that out without playing the game?  
  211.  
  212.   Better yet, let's say you copy-protect your software.  Anyone who
  213.   knows a thing or two about ResEdit knows that copy-protection, in
  214.   general, doesn't work.  Why?  Hackers can open the resources and 
  215.   read them!  Who needs a manual?  This encryption will make it virtually
  216.   impossible for such hackers to find (or, in the least, READ) your
  217.   copy-protection.
  218.  
  219.   (I even used the encryption in this program.  it works very well)
  220.  
  221. •Version History
  222.   
  223.   1.0a:  Initial release
  224.   1.1a:  Added the AWB feature, and changed it so that resources that
  225.          already exist won't be written twice (ie no two resource types
  226.          with the same ID).
  227.   1.2a:  Found a minor easter-egg bug, so i removed it.  Added the option
  228.          of converting a PICT resource to a StartUpScreen file.  Also
  229.          found a bug in which the program would check Cloaker's own
  230.          resources when converting from file to resource.
  231.  
  232. •Future Enhancements:
  233.  
  234.   I see very few right now.  I'm very pleased with this final product.
  235.   The only criticism is the icon i use for "rsrc" files...if you can
  236.   make a better one, let me know!
  237.  
  238.   ...i might disable some features while the program is unregistered.
  239.  
  240.   also:  (this isn't an enhancement, really) i might make a quick
  241.   and dirty encryption program using my Whacked code.  In a way, i
  242.   have already;  the difference is that, when decoded, it's automatically
  243.   a TEXT file (and whatever file you encrypt should be reset to the
  244.   proper creator/file type).
  245.  
  246. •How much does Cloaker cost?
  247.  
  248.   $5.  I suggest you write out a check.  If you have internet e-mail,
  249.   let me know--as soon as i get payment, i'll send off your reg code
  250.   asap.  with us mail...??
  251.  
  252.   You should be thankful, though, that this version is fully enabled,
  253.   even if you haven't paid shareware.
  254.  
  255.   The cost of the Whacked encryption library is free--the only stipulation
  256.   is that, if you use it, you must include me in the credits (ie "Whacked
  257.   alogrithm by Grant Guenther")  i would like i if you included the
  258.   version of the alogrithm--if you look in the header file, it's a
  259.   defined constant.
  260.  
  261. •How do I contact you?
  262.  
  263.   I typically don't like giving out my mailing address, but it's the
  264.   only way you can send money to me.  if you want to contact me, please
  265.   PLEASE do it through internet e-mail.  response time is quick and i'm
  266.   generally in a better mood when answering questions or taking complaints
  267.   if done via e-mail.  otherwise, you can snail me at:
  268.  
  269.   grant guenther
  270.   18250 fremont fort dr.
  271.   peyton, co  80831
  272.  
  273.   thru internet:
  274.  
  275.   grant@macshack.usa.net
  276.   cats.godot@ionx.com
  277.   maddie@ctnet.org
  278.  
  279.   (i might even be reached by tbolton@execpc.com, but i wouldn't recommend
  280.    it..)
  281.  
  282.